<template>
  <div>
    <h1>App组件</h1>
    <hr />
    <!-- <Test @fn="handle"></Test> -->
    <Test ref="test"></Test>
  </div>
</template>

<script>
import Test from './Test.vue'
export default {
  components: {
    Test,
  },
  mounted() {
    this.$refs.test.$on('fn', this.handle)
  },

  methods: {
    handle(data) {
      console.log('app接收到数据了', data)
    },
  },
}
</script>

<style></style>
